package com.xuecheng.content.api;

import com.xuecheng.content.model.dto.CourseCategoryTreeDto;
import com.xuecheng.content.model.po.CourseCategory;
import com.xuecheng.content.service.CourseCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Linzkr
 * @description: TODO 课程分类相关操作 1. 返回课程所属的课程分类--树形结构
 * @date 2023/1/14 20:41
 */
@Api(value = "课程分类相关接口",tags = "课程分类相关的接口")
@RestController
@Slf4j
public class CourseCategoryController {
    @Autowired
    private CourseCategoryService courseCategoryService;
    @ApiOperation("课程分类查询接口")
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes(){
        return courseCategoryService.queryTreeNodes("1");
    }

}
